filechooserwidget: Avoid criticals when in recent mode
authorTimm Bäder <mail@baedert.org>
Thu, 20 Feb 2020 10:59:56 +0000 (11:59 +0100)
committerTimm Bäder <mail@baedert.org>
Fri, 6 Mar 2020 15:29:32 +0000 (16:29 +0100)
Don't try to use the browse_files_model just because we have a location
entry. The model might still be NULL at this point.

gtk/gtkfilechooserwidget.c

index 73a69626ee4c2afdc303c0e4b667ac15c6f1ddd8..8e50026f736329178ba7e86cbbd28ba99e8c7929 100644 (file)
@@ -7169,7 +7169,8 @@ list_selection_changed (GtkTreeSelection     *selection,
   if (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)) == NULL)
     return;
 
-  if (priv->location_entry)
+  if (priv->location_entry &&
+      priv->browse_files_model)
     update_chooser_entry (impl);
 
   location_bar_update (impl);